package org.hcf.springdemo.consumerServerSpringBootDemo.service.impl;

import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.Reference;
import org.hcf.springdemo.consumerServerSpringBootDemo.service.IUserService;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements IUserService {
    @Reference// 引用 1.pom坐标. 2.定义同一路径的java文件  IT
    org.hcf.springdemo.providerServerDemo.service.ITicketService ticketService;//

    @Override
    @GlobalTransactional
    public void buyTicket(){
        System.out.println(ticketService.getTicket());
        System.out.println(ticketService);
    }

}
